package gipf.trunk;

import java.awt.Point;

public class MovementCommand implements Command {

	 superPoint superPoint;
	    Point[] pointVector;
	    int index;
	    int from;
	    int direction;
		private String head;
	     
	    public MovementCommand(){
	        this.pointVector = new Point[2];
	    } 
	    
	    public void setHead(String head){
	    	this.head = head;
	    }
	    
	    protected Command setVector(Point initPoint, Point destPoint){
	        
	    	this.pointVector[0] = initPoint;
	        this.pointVector[1] = destPoint;
	    
	        return this;
	    }
	    
	    public void addFrom(int from){
	    	this.from = from;
	    }
	 
	    public int getFrom(){
	    	return from;
	    }
	    
	    public void addIndex(int index){
	    	this.index = index;
	    }
	     
	    
	    @Override
	    public Object[] extractVector(){ 
	        return this.pointVector; };
	    
	    @Override
	    public Point extractPoint(){
	        return this.pointVector[0];
	    }

	    @Override
	    public void execute(){

	    };
	    
	    @Override
	    public void undo(){};//useful later
	    
	    @Override 
	    public String extractHead(){return "move";};
	    
	    private class State extends MovementCommand{}//useful later

		@Override
		public int extractIndex() {
			return index;
		}
}
